package com.loren.tetris.windows.ui;

import com.loren.tetris.data.GameData;
import com.loren.tetris.data.constant.DataConstant;
import com.loren.tetris.utils.AssistiveUtils;

import java.awt.*;

public class BoxPerson extends Box {

    public BoxPerson(int boxX, int boxY, int boxW, int boxH, GameData gameData) {
        super(boxX, boxY, boxW, boxH, gameData);
    }

    @Override
    protected void gameAction(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;
        g2.setFont(new Font(AssistiveUtils.getFontFamily(), Font.ITALIC, 40));
        g2.setPaint(new GradientPaint(this.getBoxX() + 50, this.getBoxY() + 20, DataConstant.COLOR_BLUE,
                this.getBoxX() + this.getBoxW() - 50, this.getBoxY() + this.getBoxH() - 20, DataConstant.COLOR_ORANGE, true));
        g2.drawString("by", this.getBoxX() + 50, this.getBoxY() + 60);
        g2.drawString("Loren", this.getBoxX() + 140, this.getBoxY() + 90);
    }
}
